//内容s
function HanderAjax() {
	$.ajax({
		type: "post",
		url: Urls + "/api/Cms/GetTopicDetailAndDocList",
		data: JSON.stringify({
			"PageIndex": '1',
			"PageSize": '5',
			"TopicId": Id,
		}),
		success: function(res) {
			var DocList_data = res.Data.DocList;
			for(var i = 0; i < DocList_data.length; i++) {
				var Imgsrc = res.Data.DocList[i].ThumbnailUrl[0];
				var contentLi = "<li><div><img src=" + Imgsrc + "></div><div><p>" + DocList_data[i].Title + "</p><p>" + DocList_data[i].Summary + "</p></div></li>"
				$('.content ul').append(contentLi)
			}
			var TopicInfo_data = res.Data.TopicInfo;
			var hangder_src = TopicInfo_data.PhotoUrl;
			$('.hangder_img p').text(TopicInfo_data.Title)
			$('.hangder_img').append("<img src=" + hangder_src + ">")
		}
	})
}
HanderAjax();
//轮播图
$.ajax({
	type: "post",
	url: Urls + "/api/Cms/GetTopicListV1",
	data: JSON.stringify({
		"PageIndex": 1,
		"PageSize": 5,
		"ThisTopicId": Id,
		"Keyword": ""
	}),
	success: function(datas) {
		console.log(datas)
		var TopicList = datas.Data.TopicList;
		for(var i = 0; i < TopicList.length; i++) {
			var sweime = '<div class="swiper-slide sweione">' +
				'<img src="' + TopicList[i].PhotoUrl + '" />' +
				'<p>' + TopicList[i].Title + '</p>' +
				'</div>';
			$('.swiper-wrapper').append(sweime);
		}
		//轮播图
		var mySwiper = new Swiper('.swiper-container', {
			slidesPerView: 2, //'auto'
			observer: true, //修改swiper自己或子元素时，自动初始化swiper
			observeParents: false, //修改swiper的父元素时，自动初始化swiper
			onTransitionEnd: function(swiper) {
				if(swiper.progress == 1) {
					swiper.activeIndex = swiper.slides.length - 1
				}
			}
		})
	}
});